home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: in1.uu.net!tellab5!news
- From: Joe Toth <toth@tellabs.com>
- Subject: alarm()/setitimer() signals cause terminal 'bell/flash' (Was - Re: (no subject))
- X-Nntp-Posting-Host: sunh25
- Content-Type: text/plain; charset=us-ascii
- Message-ID: <1996Jan16.140026.15483@tellab5.tellabs.com>
- Sender: news@tellab5.tellabs.com (News)
- Content-Transfer-Encoding: 7bit
- Organization: Tellabs Operations, Inc.
- References: <1996Jan15.174105.22784@tellab5.tellabs.com> <4dek8i$qjf@chianina.au.wang.com>
- Mime-Version: 1.0
- Date: Tue, 16 Jan 1996 14:00:26 GMT
- X-Mailer: Mozilla 1.1 (X11; U; SunOS 4.1.3 sun4c)
- X-Url: news:4dek8i$qjf@chianina.au.wang.com
-
- Jeremy Lee <jeremy_lee@ccmail.au.wang.com> wrote:
- >Joe Toth <toth@tellabs.com> wrote:
- >[...]
- >>The Scenario;
- >[...]
- >> I perform my functions and set
- >> the signals to allow for a proper return to the code when the interrupt
- >> occurred. For some reason, the 'bell' character is output to the terminal
- >> which causes the audio/screen flash on the monitor. The standard code
- >> is executing in a system call (read) when the SIGALRM is generated.
- >[...]
- >
- >alarm() can't do that. read() can't do that. You MUST have something queued
- >in the output buffer that has not been flushed by any of the canonical
- >processing until the interrupt occurs. Try flushing the buffer ?TCIOFLUSH?
- >(termios.h) via an ioctl. While this might make the problem go away, it
- >would be better to find out whats ready to print and where it came from.
-
- I know that the alarm() and setitimer() do not do an alarm (bell)
- automatically (at least according to the man page). And I know that
- read on its own is not doing the alarm.
-
- I have verified that there is no output needing a flush, and the problem
- persists.
-
- I have a feeling it is because the signal (SIGALRM) is occuring during
- the system call to read(). I tried changing the read to getchar(), and
- the same symptom exists.
-
- I realize that the 'bell' is proobably system generated.
- I just want to get rid of it.
-
- >--
- >----------------------------------------------------------------------
- >Jeremy Lee
- >Wang Australia
- >jeremy_lee@ccmail.au.wang.com
- >
-
- --
- _ _ ___ --------------------------+---------------------------------
- | / _ | Joseph G. Toth Jr. | Tellabs Operations, Inc.
- \_| \_/ | | toth@tellabs.com
-
- > Every program has at least one bug and can be shortened by at least
- > one instruction -- from which, by induction, it is evident that every
- > program can be reduced to one instruction that does not work.
- > -- Ken Arnold
-
-